<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateVillageThingsCommentTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('village_things_comments', function (Blueprint $table) {
            $table ->increments('id') ->comment('大事小情评论表');
            $table ->integer('village_things_id') ->default('0') ->comment('预约文章ID');
            $table ->text('content') ->nullable() ->comment('评论内容');
            $table ->text('imgs') ->nullable() ->comment('图片');
            $table ->string('video') ->nullable() ->comment('视频地址');
            $table ->integer('user_id') ->default('0') ->comment('评论员ID');
            $table ->integer('zan_num') ->default('0') ->comment('点赞次数');
            $table ->integer('reply_id') ->default('0') ->comment('回复评论id');
            $table ->integer('reply_user_id') ->default('0') ->comment('回复用户id');
            $table ->tinyInteger('is_show') ->default('1') ->comment('展示1，隐藏0');
            $table ->timestamps();
            $table ->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('village_things_comments', function (Blueprint $table) {
            //
        });
    }
}
